﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace RoadQualityEvalAPI.Models
{
    public class UserModel
    {
        public int UserId { get; set; }

        [Required]
        [Display(Name = "User name")]
        public string UserName { get; set; }

        [Display(Name = "User Information")]
        [DataType(DataType.MultilineText)]
        public string UserInfo { get; set; }

        [Display(Name = "Registration Date")]
        public DateTime CreatedAt { get; set; }

        [Required]
        [Display(Name = "User email")]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        [Required]
        [Display(Name = "User Password")]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 5)]
        [DataType(DataType.Password)]  
        public string HashedPass { get; set; }

        [Display(Name = "User Roles")]
        public IList<RoleModel> UserRoles { get; set; }
    }
}